<template>
  <div @click="maopao">
    <h3>vue事件修饰符</h3>
    <!-- 
        vue中提供事件修饰符
        .prevent阻止默认行为
        .stop阻止事件冒泡
       -->
    <a @click.prevent.stop="fn" href="http://www.jd.com">jd</a><br>
    <a @click.prevent.stop="fn1(100)" href="http://www.baidu.com">baidu</a>
    
  </div>
</template>

<script>
export default {
  methods: {
    fn() {
    },
    fn1() {
    },
    maopao(){
        console.log('div事件被触发了');
    }
  },
};
</script>

<style>
</style>